Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microTVM][RVM] Set the number of cores based on the VM sizing #8624

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

gromero
Copy link
Contributor

@gromero gromero commented Aug 2, 2021

Set the number of cores for scripts and builds that run inside the RVM
based on the specified number of cores for the VM.

Currently Vagrant doesn't set env. variable TVM_CI_NUM_CORES with the
number of cores available in the VM created by Vagrant, as a consequence
the scripts and builds (like the ones used to build TVM and QEMU) that
run inside the VM after it is created will use the default number of
only 2 CPUs, so not using the full CPU resources available in the VM,
in case there are more than 2 cores available.

This commit sets TVM_CI_NUM_CORES equal to the number of cores available
in the VM created by Vagrant so the builds (which use that environment
variable to find out the number of CPUs that must be used for the
builds) can use all the CPUs available, speeding up the builds.

Signed-off-by: Gustavo Romero gustavo.romero@linaro.org

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

Set the number of cores for scripts and builds that run inside the RVM
based on the specified number of cores for the VM.

Currently Vagrant doesn't set env. variable TVM_CI_NUM_CORES with the
number of cores available in the VM created by Vagrant, as a consequence
the scripts and builds (like the ones used to build TVM and QEMU) that
run inside the VM after it is created will use the default number of
only 2 CPUs, so not using the full CPU resources available in the VM,
in case there are more than 2 cores available.

This commit sets TVM_CI_NUM_CORES equal to the number of cores available
in the VM created by Vagrant so the builds (which use that environment
variable to find out the number of CPUs that must be used for the
builds) can use all the CPUs available, speeding up the builds.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
@mehrdadh
Copy link
Member

mehrdadh commented Aug 2, 2021

@gromero great finding and thanks for fixing it!

Copy link
Member

@mehrdadh mehrdadh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@areusch areusch merged commit d30e4ef into apache:main Aug 3, 2021
@areusch
Copy link
Contributor

areusch commented Aug 3, 2021

thanks @gromero @mehrdadh the PR is now merged!

ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
…e#8624)

Set the number of cores for scripts and builds that run inside the RVM
based on the specified number of cores for the VM.

Currently Vagrant doesn't set env. variable TVM_CI_NUM_CORES with the
number of cores available in the VM created by Vagrant, as a consequence
the scripts and builds (like the ones used to build TVM and QEMU) that
run inside the VM after it is created will use the default number of
only 2 CPUs, so not using the full CPU resources available in the VM,
in case there are more than 2 cores available.

This commit sets TVM_CI_NUM_CORES equal to the number of cores available
in the VM created by Vagrant so the builds (which use that environment
variable to find out the number of CPUs that must be used for the
builds) can use all the CPUs available, speeding up the builds.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…e#8624)

Set the number of cores for scripts and builds that run inside the RVM
based on the specified number of cores for the VM.

Currently Vagrant doesn't set env. variable TVM_CI_NUM_CORES with the
number of cores available in the VM created by Vagrant, as a consequence
the scripts and builds (like the ones used to build TVM and QEMU) that
run inside the VM after it is created will use the default number of
only 2 CPUs, so not using the full CPU resources available in the VM,
in case there are more than 2 cores available.

This commit sets TVM_CI_NUM_CORES equal to the number of cores available
in the VM created by Vagrant so the builds (which use that environment
variable to find out the number of CPUs that must be used for the
builds) can use all the CPUs available, speeding up the builds.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants